package cn.iocoder.yudao.module.mqtt.framework.mqtt;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.ApplicationListener;
import org.springframework.integration.mqtt.event.MqttConnectionFailedEvent;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class MqttConnectionEventListener implements ApplicationListener<MqttConnectionFailedEvent> {
    @Override
    public void onApplicationEvent(MqttConnectionFailedEvent event) {
        log.warn("[Spring Integration] MQTT连接失败: {}", event.getCause().getMessage(), event.getCause());
    }
} 